package com.netease.nie.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.netease.nie.base.controllers.BaseController;
import com.netease.nie.dto.ClassifiedNavDto;
import com.netease.nie.service.NavService;

/**
 * 分类导航
 * @author wwbn3695
 * @createDate June 29th,2016
 *
 */
@RestController
@RequestMapping("/api/nav")
public class NavController extends BaseController {
	
	@Autowired
	private NavService navService;

	@RequestMapping(value = "/list", method = RequestMethod.GET, produces = "application/json")
	public String navList() throws Exception {
		List<ClassifiedNavDto> classifiedNavDtos = navService.queryAllClassifiedNavDto();
		return jsonSuccess(classifiedNavDtos);
	}
}
